package com.huodongjia.mapper;

import com.huodongjia.pojo.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface UserMapper {
    @Select("select * from huodongjia.user where name=#{name}")
    public User findByName(String name);
    @Select("select * from huodongjia.user where id=#{id}")
    public User findById(int id);
    @Insert("insert into huodongjia.user(name, password, head) values(#{name},#{password},#{head}) ")
    public int insertUser(User user);
    @Update("update huodongjia.user set organization=${organization} where id=${userId}")
    void bevip(int userId, String organization);
}
